package models;

import java.util.List;

import javax.persistence.Entity;
import javax.persistence.OneToMany;


import play.db.jpa.Model;

@Entity
public class Item extends Model {

	private String name;
	
	@OneToMany
	private List<CustomField> customFields;
	
	private Category category;
	
	private double avgRating;
	
	private int votes;
	
	public Item(String name, List<CustomField> customFields, Category category,
			double avgRating, int votes) {
		super();
		this.name = name;
		this.customFields = customFields;
		this.category = category;
		this.avgRating = avgRating;
		this.votes = votes;
	}

	public Category getCategory() {
		return category;
	}

	public void setCategory(Category category) {
		this.category = category;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public double getAvgRating() {
		return avgRating;
	}

	public void setAvgRating(double avgRating) {
		this.avgRating = avgRating;
	}

	public int getVotes() {
		return votes;
	}

	public void setVotes(int votes) {
		this.votes = votes;
	}
	
}
